Feat: Integrate python-dotenv for Secure API Credential Management#304
Feat: Integrate python-dotenv for Secure API Credential Management#304pwildenhain merged 3 commits intoredcap-tools:masterfrom
Conversation
There was a problem hiding this comment.
👍🏻 to using .env for credential management. I think it's a great call out since most REDCap users don't typically have a programming background and might not know about safe credential management.
Thanks also for updating the documentation to showcase how to use this
My only request is remove python-dotenv as a direct dependency. I think it's good advice for them to install and use it alongside PyCap but it's not integral to how the package itself works
|
Thanks for the feedback! I removed python-dotenv from the core dependencies and reverted the lockfile changes. The docs now just recommend installing it alongside PyCap, and I added a quickstart snippet plus a .env.example template so users can copy/paste their credentials. Let me know if anything else would help. |
|
Fix lint setup and ensure tests run clean |
|
Don't worry about the CI failures, I think it has something to do with how my integration tests are setup. Thanks for you work! |
This pull request enhances PyCap by integrating
python-dotenvfor more secure and flexible management of REDCap API credentials.Changes:
python-dotenvDependency: Thepython-dotenvlibrary is now a dependency, as specified inpyproject.toml. This allows users to load environment variables from a.envfile..envUsage:docs/quickstart.md: Updated the initial setup instructions to guide users on creating a.envfile forREDCAP_API_URLandREDCAP_API_KEY, and how to load them usingpython-dotenv.docs/index.md: The installation section now includes guidance on setting up a.envfile for credential management.Benefits:
.envfiles.